Network devices may be devices that are provided as part of a computer or another computing device (a host) and are used to offload some network processing from a CPU of the host. Thus, network devices can include, for example, host bus adapters (HBAs) that connect to Fibre Channel, SCSI, Ethernet or other types of networks or network interface adapters (NICs) that connect to Ethernet and other types of networks.
Network devices are usually designed to perform a predefined narrow range of operations (usually limited to processing network communications) fast and efficiently. Thus, network devices may include software and hardware that is very finely tuned for a relatively narrow range of precisely defined tasks.
Direct memory access (DMA) is a memory access scheme that allows various peripheral devices (such as a network device) to read and write to memory with minimal CPU involvement. Network devices and HBAs often use direct memory access to write received and processed incoming network communications to the host memory and to read communications that are to be sent over the network from the host memory.
Existing network devices can include software (or firmware) which performs various DMA operations. The firmware may accomplish this by issuing instructions to a hardware designed to perform DMA operations. In some cases, the firmware may issue instructions for null or zero length DMA operations. Null DMA operations are operations that do not require that any data be written or read from the host's memory. While strictly speaking, null DMA operations are not necessary, they may be issued by the firmware nevertheless, for optimization reasons. For example, it may be faster for the firmware to issue a null DMA operation than to check whether a DMA operation it is about to issue is a null operation and not to issue it if it is.
The firmware usually processes completion notifications for all DMA operations issued by it to determine whether they were successfully completed. Completion notifications for null DMA operations are usually received by the firmware much faster than those for any other operation, because null DMA operations do not require any memory access to be completed. This causes completion notifications to be received by the firmware out of order, which in turn requires the firmware to take additional steps to identify the completion notifications.